import { Application } from "../Application";

/**
 * MsgHandler类
 * 定义Msg处理方法时继承这个类且需要默认导出
 * 外部不要直接引用Handler类
 * ```
 * export default class MsgXXX extends MsgHandler {
 *     
 *   test(sess: FrontendSession | BackendSession, msg: any, msgId: number) {
 *        //.....do something
 *   }
 * 
 * }
 * ```
 */
export class MsgHandler {

    app: Application;

    constructor(app: Application) {
        this.app = app;
    }

    /**
     * 重载时调用
     */
    onReload(old: this) {

    }

}